#!/usr/bin/python
# Filename: mongodb.py

import logging
from pymongo import *
from mjs_public import singleton

class MjsMongoDB(singleton.Singleton):
    ip = "192.168.2.200"
    port = 27017

    def __init__(self):
        # self.client = MongoClient(self.ip, self.port)
        self.client = MongoClient(host="192.168.2.200", port=27017)
        self.db = self.client['manging']
        self.coll = self.db['userinfo']
        information_id = self.coll.insert({"name": "xiaoxu", "wangwei": "23"})

        pass

    def obj(self):
        return self.mangjing

    def __del__(self):
        pass

    pass
